﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Entity.Custom
{
    public class ResponseData
    {
        /// <summary>
        /// Success status
        /// </summary>
        public bool Success { get; set; }

        /// <summary>
        /// Message return for client
        /// </summary>
        public string Message { get; set; }

        /// <summary>
        /// Total records, used when return list of record
        /// </summary>
        public int Total { get; set; }

        /// <summary>
        /// Type of error, when error occurs
        /// </summary>
        public ResponseType Type { get; set; }

        /// <summary>
        /// Reponse data: a object or list or any data type
        /// </summary>
        public object Data { get; set; }

        /// <summary>
        /// Gets or sets the extend data.
        /// </summary>
        /// <value>
        /// The ext data.
        /// </value>
        public object ExtData { get; set; }
    }

    public enum ResponseType
    {
        Other = 0,
        NotLogin = 1
    }
}
